package com.bondex.charter.controller;

import com.bondex.charter.po.CharterUserOperateLogVO;
import com.bondex.charter.pojo.UserOperateLogSearchParam;
import com.bondex.charter.service.UserOperateLogService;
import com.bondex.global.pojo.PageTableParamT;
import com.bondex.global.pojo.ResultT;
import com.bondex.global.utils.JacksonUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 用户操作日志查询接口
 * Created by daixw
 * 20210917
 */
@Controller
@RequestMapping("/userOperateLog")
@Tag(name = "UserOperateLog")
public class UserOperateLogController extends BaseController {

	@Autowired
	private UserOperateLogService userOperateLogService;

	@Operation(summary = "用户日志信息查询")
	@RequestMapping(value = "/findCharterUserOperateLogList", method = RequestMethod.POST)
	@ResponseBody
	public String findCharterUserOperateLogList(HttpServletRequest request, HttpServletResponse response,@RequestBody PageTableParamT<UserOperateLogSearchParam> param) {
		ResultT<List<CharterUserOperateLogVO>> oResult = userOperateLogService.findCharterUserOperateLogList(param);
		return JacksonUtil.writeValue(oResult);
	}

}